# Contributor: Jonas <3426-spameier@users.gitlab.alpinelinux.org>
# Maintainer: Jonas <3426-spameier@users.gitlab.alpinelinux.org>
pkgname=grpcui
pkgver=1.3.3
pkgrel=0
pkgdesc="Interactive web UI for gRPC, along the lines of postman"
url="https://github.com/fullstorydev/grpcui"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/fullstorydev/grpcui/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -ldflags "-X main.version=v$pkgver" ./cmd/grpcui/
}

check() {
	go test ./...
}

package() {
	install -Dm755 grpcui -t "$pkgdir"/usr/bin/
}

sha512sums="
ad4b715ee51dc0bfc592c84fa046b03f77a038f15feb58e8b869934360359e928016efda5aa101b22a2b7441f35dd497b863a4ef56922b0f9bc8dc391c10a1ff  grpcui-1.3.3.tar.gz
"
